package com.wss.module.wan.ui.project.mvp.model;


import com.wss.common.base.mvp.BaseModel;
import com.wss.common.net.Api;
import com.wss.common.net.NetworkManage;
import com.wss.module.wan.bean.Classification;
import com.wss.module.wan.ui.project.mvp.contract.ProjectContract;
import java.util.List;
import com.zhouyou.http.callback.SimpleCallBack;
import ohos.aafwk.ability.ILifecycle;
import ohos.aafwk.ability.Lifecycle;

/**
 * Describe：项目Module
 * Created by 吴天强 on 2018/11/15.
 */
public class ProjectModel extends BaseModel implements ProjectContract.Model {

    public ProjectModel(Lifecycle lifecycleOwner) {
        super(lifecycleOwner);
    }

    @Override
    public void getProjectType(SimpleCallBack<List<Classification>> callBack) {
        NetworkManage.createGet().requestList(Api.PROJECT, callBack);
    }

    @Override
    public void getProject(int page, int id,SimpleCallBack<String> callBack) {
        NetworkManage.createGet().request(String.format(Api.PROJECT_LIST, page, id), callBack);
    }
}
